package ru.tulupov.scheduledrunner;

public class RepeatedRunner extends DelayedRunner {

	private long count;

	public RepeatedRunner(String command, long delay, long count) {
		super(command, delay);

		if (count < 0) {
			throw new IllegalArgumentException();
		}

		this.count = count;
	}

	@Override
	public void run() {
		for (long i = 0; i < count; i++) {
			super.run();
		}
	}
}
